package com.shwread.android.qysw.activity.healthy;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.shwread.android.qysw10000204.R;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by Fantasy on 16/3/27.
 */
public class HealthyFriendPKActivity extends Activity {
    @InjectView(R.id.back_btn)
    ImageView backBtn;
    @InjectView(R.id.back_text)
    TextView backText;
    @InjectView(R.id.title_text)
    TextView titleText;
    @InjectView(R.id.right_text)
    TextView rightText;
    @InjectView(R.id.right_img)
    ImageView rightImg;
    @InjectView(R.id.friend_pk_button)
    RelativeLayout friendPkButton;
    @InjectView(R.id.group_pk_button)
    RelativeLayout groupPkButton;
    @InjectView(R.id.jinsai_pk_button)
    RelativeLayout jinsaiPkButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.healthy_pk_friend_activity);
        ButterKnife.inject(this);
        setView();
    }

    public void setView() {
        titleText.setText("好友PK");
        backBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        friendPkButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                Intent friendIntent = new Intent(HealthyFriendPKActivity.this, FriendPKActivity.class);
//                startActivity(friendIntent);
                Intent friendNewIntent = new Intent(HealthyFriendPKActivity.this, FriendPKNewActivity.class);
                startActivity(friendNewIntent);
            }
        });
        groupPkButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent groupIntent = new Intent(HealthyFriendPKActivity.this, GroupPKActivity.class);
                groupIntent.putExtra("isNeedStep", 0);
                startActivity(groupIntent);
            }
        });
        jinsaiPkButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent groupIntent = new Intent(HealthyFriendPKActivity.this, GroupPKActivity.class);
                groupIntent.putExtra("isNeedStep", 1);
                startActivity(groupIntent);

            }
        });
    }
}
